extends PanelContainer


@onready var upgrade_name_label: Label = %UpgradeNameLabel
@onready var upgrade_description_label: Label = %UpgradeDescriptionLabel

# 升级选择信号
signal upgrade_card_selected()


func _ready():
	# 添加点击事件处理
	gui_input.connect(_on_gui_input)

func set_ability_upgrade(upgrade: AbilityUpgrade):
	upgrade_name_label.text = upgrade.name
	upgrade_description_label.text = upgrade.description

func _on_gui_input(event: InputEvent):
	if event.is_action_pressed("left_click"):

		upgrade_card_selected.emit()
